<template>
	<view class="wrap">
		<view class="content">
			<view class="title">
				销售/回收协议
			</view>
			<rich-text :nodes="content"></rich-text>
		</view>
		<view class="base-box">
			<view class="base-btn-a" @click="takeSubmit(1)">
				同意签字
			</view>
			<view class="base-btn-b" @click="takeSubmit(2)">
				取消
			</view>
		</view>
	</view>
</template>

<script>
	import {
		AgreementText
	} from '@/api/new_api.js'
	export default {
		components: {},
		data() {
			return {
				content:''
			}
		},
		onShow() {
			
		},
		onLoad() {
			this.getAgreementText();

		},
		methods: {
			takeSubmit(type){
				if(type == 1){
					uni.navigateTo({
						url: '/pages/users/authentication/confirmSignature'
					})
				}else{
					uni.navigateBack()
				}
			},
			getAgreementText() {
				AgreementText().then((res) => {
					this.content = res.data.content;
				}).catch((error) => {
					console.log('error', error, '----------------');
				})
			},
		}
	}
</script>


<style lang="scss" scoped>
	.wrap {
		width: 750rpx;
		min-height: 100vh;
		box-sizing: border-box;
		background: #fff;
	
	
		.content {
			padding: 20rpx 30rpx 256rpx;
			width: 100%;
			box-sizing: border-box;
			/*盒子宽自己设置想要的宽度*/
			height: auto;
			/*高度自动*/
			display: inline-block;
			/*转为行内块元素*/
			white-space: pre-wrap;
			/*处理元素内的空白,保留空白符序列，但是正常地进行换行*/
			word-wrap: break-word;
			/*允许长单词或 URL 地址换行到下一行,在长单词或 URL 地址内部进行换行*/
			.title{
				font-size: 38rpx;
				font-weight: bold;
				color: rgba(48, 48, 48, 1);
				text-align: center;
				margin-bottom: 32rpx;
			}
			
		}
	}
	
	.base-box {
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 99;
		width: 750rpx;
		height: 228rpx;
		background: rgba(255, 255, 255, 1);
		border-top: 1px solid rgba(240, 240, 240, 1);
		padding-top: 32rpx;
		box-sizing: border-box;
	
		.base-btn-a {
			margin: 0 auto;
			width: 696rpx;
			height: 98rpx;
			border-radius: 12rpx;
			background: linear-gradient(223.69deg, rgba(255, 250, 207, 1) 0%, rgba(244, 222, 129, 1) 100%);
			font-size: 32rpx;
			font-weight: bold;
			line-height: 98rpx;
			color: rgba(128, 72, 28, 1);
			text-align: center;
		}
		.base-btn-b{
			margin-top: 16rpx;
			font-size: 32rpx;
			font-weight: bold;
			color: rgba(71, 71, 71, 1);
			text-align: center;
		}
	}
	

</style>